package com.globallogic.service;

import java.util.List;

import org.apache.log4j.Logger;

import com.globallogic.model.Task;

public class TaskExecutor {

	public void execute(List<Task> taskList, String login, String password) {
		logger.info("<html><body><ol>");		
		
		PageProcessor pageProcessor = new PageProcessor();
		pageProcessor.start(login, password);
		
		for (Task task : taskList) {
			pageProcessor.process(task, logger);
		}
		
		pageProcessor.finish();
		logger.info("</ol></body></html>");
	}

	private Logger logger = Logger.getLogger("results");	
}
